package com.ruoyi.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.product.mapper.ProductStateMapper;
import com.ruoyi.product.domain.ProductState;
import com.ruoyi.product.service.IProductStateService;

/**
 * 订单状态Service业务层处理
 * 
 * @author guoguoa
 * @date 2025-01-07
 */
@Service
public class ProductStateServiceImpl implements IProductStateService 
{
    @Autowired
    private ProductStateMapper productStateMapper;

    /**
     * 查询订单状态
     * 
     * @param id 订单状态主键
     * @return 订单状态
     */
    @Override
    public ProductState selectProductStateById(Integer id)
    {
        return productStateMapper.selectProductStateById(id);
    }

    /**
     * 查询订单状态列表
     * 
     * @param productState 订单状态
     * @return 订单状态
     */
    @Override
    public List<ProductState> selectProductStateList(ProductState productState)
    {
        return productStateMapper.selectProductStateList(productState);
    }

    /**
     * 新增订单状态
     * 
     * @param productState 订单状态
     * @return 结果
     */
    @Override
    public int insertProductState(ProductState productState)
    {
        return productStateMapper.insertProductState(productState);
    }

    /**
     * 修改订单状态
     * 
     * @param productState 订单状态
     * @return 结果
     */
    @Override
    public int updateProductState(ProductState productState)
    {
        return productStateMapper.updateProductState(productState);
    }

    /**
     * 批量删除订单状态
     * 
     * @param ids 需要删除的订单状态主键
     * @return 结果
     */
    @Override
    public int deleteProductStateByIds(Integer[] ids)
    {
        return productStateMapper.deleteProductStateByIds(ids);
    }

    /**
     * 删除订单状态信息
     * 
     * @param id 订单状态主键
     * @return 结果
     */
    @Override
    public int deleteProductStateById(Integer id)
    {
        return productStateMapper.deleteProductStateById(id);
    }
}
